package com.zxl.grocery.modular.crawler.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 类别表
 * </p>
 *
 * @author zxl
 * @since 2018-08-02
 */
@TableName("crawler_target")
public class CrawlerTarget extends Model<CrawlerTarget> {

    private static final long serialVersionUID = -1831803585314542849L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 封面url
     */
    @TableField("cover_url")
    private String coverUrl;
    /**
     * 名称
     */
    private String name;
    /**
     * 描述
     */
    private String info;
    /**
     * 排序
     */
    private Integer sort;
    /**
     * 状态
     */
    private Integer status;
    /**
     * 代码
     */
    @TableField("sources_id")
    private Integer sourcesId;
    /**
     * 配置参数表Id
     */
    @TableField("config_id")
    private Integer configId;
    /**
     * 目标爬虫路径
     */
    @TableField("target_url")
    private String targetUrl;
    /**
     * 创建人ID
     */
    @TableField("create_user_id")
    private Long createUserId;
    /**
     * 修改人ID
     */
    @TableField("update_user_id")
    private Long updateUserId;
    /**
     * 创建时间
     */
    @TableField("create_date")
    private Date createDate;
    /**
     * 修改时间
     */
    @TableField("modify_date")
    private Date modifyDate;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getCoverUrl() {
        return coverUrl;
    }

    public void setCoverUrl(String coverUrl) {
        this.coverUrl = coverUrl;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getSourcesId() {
        return sourcesId;
    }

    public void setSourcesId(Integer sourcesId) {
        this.sourcesId = sourcesId;
    }

    public Integer getConfigId() {
        return configId;
    }

    public void setConfigId(Integer configId) {
        this.configId = configId;
    }

    public String getTargetUrl() {
        return targetUrl;
    }

    public void setTargetUrl(String targetUrl) {
        this.targetUrl = targetUrl;
    }

    public Long getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(Long createUserId) {
        this.createUserId = createUserId;
    }

    public Long getUpdateUserId() {
        return updateUserId;
    }

    public void setUpdateUserId(Long updateUserId) {
        this.updateUserId = updateUserId;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getModifyDate() {
        return modifyDate;
    }

    public void setModifyDate(Date modifyDate) {
        this.modifyDate = modifyDate;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "CrawlerTarget{" +
                "id=" + id +
                ", coverUrl=" + coverUrl +
                ", name=" + name +
                ", info=" + info +
                ", sort=" + sort +
                ", status=" + status +
                ", sourcesId=" + sourcesId +
                ", configId=" + configId +
                ", targetUrl=" + targetUrl +
                ", createUserId=" + createUserId +
                ", updateUserId=" + updateUserId +
                ", createDate=" + createDate +
                ", modifyDate=" + modifyDate +
                "}";
    }
}
